class CreateAssociates < ActiveRecord::Migration
  def self.up
    create_table :associates do |t|
      t.column :organization_id, :integer
      t.column :first_name, :string
      t.column :last_name, :string
      t.column :comments, :text
      t.column :created_by, :string
      t.column :updated_by, :string
      t.column :created_at, :datetime
      t.column :updated_at, :datetime
    end
    
    add_index :associates, :id
    add_index :associates, :organization_id
  end
  

  def self.down
    remove_index :associates, :id
    remove_index :associates, :organization_id
    drop_table :associates
  end
end
